import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useComtokenStore = defineStore(
  'cp-tonken',
  () => {
    // 组件token
    const token = ref()
    // 设置用户，登录后使用
    const setToken = (u: any) => {
      token.value = u
    }

    return { token, setToken }
  },
  {
    persist: true
  }
)
